﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AOP.Rougamo
{

    //[Logging]
    public class Service
    {
        // 静态织入将被应用
        public static void M1() { }

        // 静态织入将被应用
        public void M2() { }

        // 不会应用静态织入
        protected void M3() { }


        [Logging("节点1")]
        public static int Sync(string name)
        {
            Console.WriteLine("主流程业务逻辑");
            return 1;
        }

        [Logging("节点1异步")]
        private static async Task Async(int id)
        {
            // ...
            int a = await Task.Run(() => (1 + 1));

        }
    }
}
